/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     struct ListNode *next;
 * };
 */
struct ListNode* swapPairs(struct ListNode* head) 
{
    if(head==NULL||head->next==NULL)
    {
        return head;
    }
    struct ListNode* p=head->next;//保存结点
    head->next=swapPairs(p->next);//使用递归
    p->next=head;
    return p;
}